//
//  DiseaseModel.m
//  QuickCure
//
//  Created by 王震 on 16/9/13.
//  Copyright © 2016年 haoge. All rights reserved.
//

#import "DiseaseModel.h"
#import "NetWorkTool.h"
#import "NetWorkDefine.h"

@interface DiseaseModel ()



@end

@implementation DiseaseModel



-(void)getDataWithURL:(NSString *)urlString parmas:(NSDictionary *)parmas successBlock:(void (^)(NSArray *))result{
    
    
    [[NetWorkTool shareManager] POST_RequestWithUrlString:urlString parmas:parmas successBloock:^(NSDictionary *responseObject) {
        
        NSArray *arr = responseObject[@"data"];
        NSMutableArray *mArr = [NSMutableArray array];
        
        [arr enumerateObjectsUsingBlock:^(NSDictionary * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
            
            DiseaseModel *model = [[DiseaseModel alloc] init];
            
            [model setValuesForKeysWithDictionary:obj];
            
            
            [mArr addObject:model];
            
        }];
        
        if (result) {
            result([mArr copy]);
        }

    } failureBlock:^(NSError *error) {
        
//        NSLog(@"获取失败");
    }];
   
}

-(void)setValue:(id)value forUndefinedKey:(NSString *)key{};

@end
